package com.frxuexi.video.adapter

import androidx.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.lib_base.entity.CommentBeanItem
import com.frxuexi.video.R
import com.frxuexi.video.databinding.ItemCommentBinding

class VideoCommentAdapter:BaseQuickAdapter<CommentBeanItem,BaseViewHolder>(R.layout.item_comment) {

    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemCommentBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: CommentBeanItem) {
        val binding = DataBindingUtil.getBinding<ItemCommentBinding>(helper.itemView)!!
        binding.bean=item
    }
}